const { DataTypes } = require('sequelize');
const sequelize = require('../config/database')

const SceneryReservationModel = sequelize.define('SceneryReservation', {
  s_reservation_id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true,
    allowNull: false
  },
  scenery_id: {
    type: DataTypes.INTEGER,
    allowNull: false
  },
  ticket_type: {
    type: DataTypes.ENUM('成人票', '学生票', '儿童票', '老人票'),
    allowNull: false
  },
  ticket_price: {
    type: DataTypes.DECIMAL(10, 2),
    allowNull: false
  },
  description: {
    type: DataTypes.TEXT,
    allowNull: false
  }
}, {
  freezeTableName: true,
  tableName: 'scenery_reservation',
  timestamps: false
})

module.exports = SceneryReservationModel